<template>
	<view>
		<!-- 列表 -->
		<view class="goods-card">
			<!-- 顶部编辑和配送信息 -->
			<view class="card-header">
				<el-button>编辑</el-button>
				<view class="delivery-info">
					<text class="delivery-time">Kitty主题商店从26号下午2点截单 28号配送</text>
					<text class="delivery-tag"></text>
				</view>
			</view>
			<view>
				<img src="@/static/image/hellokitty.jpg" style="width:200rpx;height:200rpx;" />
			</view>
			<!-- 商品描述 -->
			<view class="goods-desc">
				<text class="title">首团活动价 下期团恢复原价...</text>
			</view>

			<!-- 价格和数量 -->
			<view class="price-row">
				<text class="price">￥15.99</text>
				<u-number-box v-model="quantity" :min="1" :max="99" integer button-size="28"
					input-width="40"></u-number-box>
			</view>
		</view>
		<!-- 2 -->
		<view class="delivery-info">

			<text class="delivery-time">Kitty主题商店从26号下午2点截单 28号配送</text>
			<text class="delivery-tag"></text>
		</view>
		<view>
			<img src="@/static/image/hellokitty.jpg" style="width:200rpx;height:200rpx;" />
		</view>
		<!-- 商品描述 -->
		<view class="goods-desc">
			<text class="title">首团活动价 下期团恢复原价...</text>
		</view>

		<!-- 价格和数量 -->
		<view class="price-row">
			<text class="price">￥15.99</text>
			<u-number-box v-model="quantity" :min="1" :max="99" integer button-size="28"
				input-width="40"></u-number-box>
		</view>
		<!-- 3 -->
		<view class="delivery-info">

			<text class="delivery-time">Kitty主题商店从26号下午2点截单 28号配送</text>
			<text class="delivery-tag"></text>
		</view>
		<view>
			<img src="@/static/image/hellokitty.jpg" style="width:200rpx;height:200rpx;" />
		</view>
		<!-- 商品描述 -->
		<view class="goods-desc">
			<text class="title">首团活动价 下期团恢复原价...</text>
		</view>

		<!-- 价格和数量 -->
		<view class="price-row">
			<text class="price">￥15.99</text>
			<u-number-box v-model="quantity" :min="1" :max="99" integer button-size="28"
				input-width="40"></u-number-box>
		</view>




		<!-- 底部菜单栏 -->
		<view class="action-section">
			<view class="checkbox">
				<image :src="allChecked?'/static/selected.png':'/static/select.png'" mode="aspectFit"
					@click="check('all')"></image>
				<view class="clear-btn" :class="{show: allChecked}" @click="clearCart">
					清空
				</view>
			</view>
			<view class="total-box">
				<text class="price">¥{{total}}元</text>
			</view>
			<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>


		</view>
	</view>
</template>

<script>
	// export default{
	// 	data(){
	// 		return{

	// 		}
	// 	}
	// 	methods:{
	// 	}

	// }
</script>

<style>
	/* 商品卡片基础样式 */
	.goods-card {
		padding: 20rpx;
		margin: 20rpx;
		background: #fff;
		border-radius: 12rpx;
		box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
	}

	/* 卡片头部区域 */
	.card-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 15rpx;
	}

	/* 编辑按钮 */
	.card-header .edit-btn {
		font-size: 24rpx;
		color: #666;
	}

	/* 配送信息容器 */
	.card-header .delivery-info {
		display: flex;
		align-items: center;
	}

	/* 配送时间 */
	.card-header .delivery-info .delivery-time {
		font-size: 24rpx;
		color: #333;
		margin-right: 10rpx;
	}

	/* 配送标签 */
	.card-header .delivery-info .delivery-tag {
		font-size: 20rpx;
		color: #fff;
		background: #e74c3c;
		padding: 2rpx 8rpx;
		border-radius: 4rpx;
	}

	/* 商品描述区域 */
	.goods-desc {
		margin-bottom: 20rpx;
	}

	/* 商品标题 */
	.goods-desc .title {
		font-size: 28rpx;
		color: #333;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	/* 价格行布局 */
	.price-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	/* 价格样式 */
	.price-row .price {
		font-size: 32rpx;
		color: #e74c3c;
		font-weight: bold;
	}

	/* 底部操作栏 */
	.action-section {
		/* #ifdef H5 */
		margin-bottom: 100upx;
		/* #endif */
		position: fixed;
		left: 30upx;
		bottom: 30upx;
		z-index: 95;
		display: flex;
		align-items: center;
		width: 690upx;
		height: 100upx;
		padding: 0 30upx;
		background: whitesmoke;
		box-shadow: 0 0 20upx 0 rgba(0, 0, 0, .5);
		border-radius: 16upx;
	}

	/* 复选框样式 */
	.action-section .checkbox {
		height: 52upx;
		position: relative;
	}

	.action-section .checkbox image {
		width: 52upx;
		height: 100%;
		position: relative;
		z-index: 5;
	}

	/* 清除按钮动画 */
	.action-section .clear-btn {
		position: absolute;
		left: 26upx;
		top: 0;
		z-index: 4;
		width: 0;
		height: 52rpx;
		line-height: 52upx;
		padding-left: 38upx;
		font-size: 20rpx;
		color: white;
		background: #aaa9a0;
		border-radius: 0 50px 50px 0;
		opacity: 0;
		transition: .2s;
	}

	.action-section .clear-btn.show {
		opacity: 1;
		width: 120upx;
	}

	/* 总价区域 */
	.action-section .total-box {
		flex: 1;
		display: flex;
		flex-direction: column;
		text-align: right;
		padding-right: 40upx;
	}

	.action-section .total-box .price {
		font-size: 20rpx;
		color: black;
	}

	.action-section .total-box .coupon {
		font-size: 20rpx;
		color: red;
	}

	.action-section .total-box .coupon text {
		color: #fff2ff;
	}

	/* 确认按钮 */
	.action-section .confirm-btn {
		padding: 0 38upx;
		margin: 0;
		border-radius: 100px;
		height: 76upx;
		line-height: 76upx;
		font-size: 30rpx;
		background: deeppink;
		box-shadow: 1px 2px 5px rgba(217, 60, 93, 0.72);
	}

	/* 复选框选中状态 */
	.action-section .checkbox.checked,
	.cart-item .checkbox.checked {
		color: palegreen;
	}
</style>